package com.yfp.operation.mapper;

import com.yfp.common.datascope.annotation.DataScope;
import com.yfp.operation.domain.MiniBanner;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yfp.operation.domain.dto.MiniBannerDTO;
import com.yfp.operation.domain.dto.MiniBannersListDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
*
* @description 针对表【mini_banner(小程序banner)】的数据库操作Mapper
* @createDate 2024-07-17 16:43:18
* @Entity domain.com.yfp.operation.MiniBanner
*/
@Mapper
public interface MiniBannerMapper extends BaseMapper<MiniBanner> {

    /**
     * 获取活动banner
     * @param marketingId
     * @return
     */
    MiniBanner findLastByMarketingId(Long marketingId);

    @DataScope(deptAlias = "b")
    List<MiniBanner> selectAll(MiniBannerDTO miniBannerDTO);

    /**
     * 新增
     * @param miniBanner
     */
    void add(MiniBanner miniBanner);

    /**
     *
     * @param list
     */
    void sort(@Param("list") List<MiniBanner> list);

    /**
     * 获取小程序弹窗列表
     * @param miniBannersListDTO
     * @return
     */
    @DataScope(deptAlias = "b")
    List<MiniBanner> getMiniBanner(MiniBannersListDTO miniBannersListDTO);
}




